﻿<UserControl x:Class="QWeiBoN.CommentsViewUserControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="480" d:DesignWidth="480">
    
    <Grid x:Name="LayoutRoot">
        <StackPanel Margin="8" Height="600">
            <Grid Height="530">
                <ListBox HorizontalAlignment="Left" Name="CommentsList" VerticalAlignment="Top" ItemsSource="{Binding Singleline}" Visibility="Collapsed">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <Grid Margin="0,10,0,0" VerticalAlignment="Top">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="60" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <StackPanel HorizontalAlignment="Left" VerticalAlignment="Top">
                                    <Image Name="UserHeader" Margin="0,5,0,0"  Stretch="None" Source="{Binding Head}"  HorizontalAlignment="Left" VerticalAlignment="Top" Tag="{Binding Name}" />
                                </StackPanel>
                                <StackPanel Grid.Column="1" Grid.Row="0" HorizontalAlignment="Left">
                                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Top">
                                        <TextBlock TextWrapping="Wrap" Text="{Binding Nick}" Width="340" HorizontalAlignment="Left" VerticalAlignment="Top" Padding="0" />
                                        <HyperlinkButton Name="rePostLink" Content="收听" FontSize="18" Tag="{Binding OpenId}" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,0,0,0" />
                                    </StackPanel>
                                    <TextBlock TextWrapping="Wrap" Text="{Binding Origtext}" HorizontalAlignment="Left" VerticalAlignment="Top" Padding="0" Margin="0,5,0,0"/>
                                </StackPanel>
                                <StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left" Margin="0,10,10,10">
                                    <TextBlock TextWrapping="Wrap" FontSize="15"  VerticalAlignment="Top" Width="340" Text="{Binding From}"/>
                                </StackPanel>
                            </Grid>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </Grid>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Button Content="OK" Click="OKButton_Click"/>
                <Button Grid.Column="1" Content="Cancel" Click="CancelButton_Click"/>
            </Grid>
        </StackPanel>
    </Grid>
</UserControl>
